home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / mpfeel.lha / MPFeel / Plurals / mp_dpu_mgmt.m < prev    next >
Text File  |  1992-05-26  |  3KB  |  86 lines

  1. /*
  2.  *    Plurals
  3.  *
  4.  *    Author:    S.C.Merrall
  5.  *
  6.  *    File:    mp_dpu_mgmt.m
  7.  *
  8.  *    Contents:    
  9.  *
  10.  *    Description:    This management mechanism allows one to create 
  11.  *            structured collections of PEs. In such structures
  12.  *            data is moved along communicating links between the 
  13.  *            nodes rather than following pointers. The 
  14.  *            constructionist nature of this system requires us to
  15.  *            be able to manipulate the underlying context with
  16.  *            great flexibility. In a strictly functional form 
  17.  *            joining two structures to create a new one will be
  18.  *            sufficient - but as a later stage we will probbaly
  19.  *            want to support destructive updators.
  20.  *
  21.  *    Change History:
  22.  *
  23.  *    Date   Name Comment
  24.  *    -------- ---- -------
  25.  *    26:05:92 SCM  Created
  26.  *
  27.  */
  28.  
  29. /*  Overview
  30.  *  ========
  31.  *
  32.  *     A structured context cannot (easily) be represented by a set of 
  33.  *  parameters in the same way a rectangle or linear string can. So we
  34.  *  we require some way of indicarting wether a processor is a member of
  35.  *  the context or not, a simple way of doing this is to have a bit on each
  36.  *  PE acting as a flag. We can use slices of the Plural space as we need them
  37.  *  giving us 16 1-bit slices. Obvious management data is:
  38.  */
  39.  
  40. int strctxt_word = -1;    /* The current plural space slice we are allocating */
  41. int strctxt_bit;    /* words from and the next bit in that word.        */
  42.  
  43. /*  When garbage collecting we mark all the plural space as being free and then
  44.  *  unmark those that aren't. If the plural space is going to have a mixture
  45.  *  of strctxt bitmaps and plural handles we can't do this. A bit map of the 
  46.  *  plural space, one bit for each word-slice, can be used to indicate wether
  47.  *  a slice is a strctxt or not.
  48.  */
  49.  
  50. int strctxt_slices[1024/sizeof(int)]; /* Or Something */
  51.  
  52. /*  Plural space management will have to interact closely with the strctxt
  53.  *  management system and most operations, in particular - searches, will
  54.  *  need to amine the contents of the strctxt_slices array. This 
  55.  *  suggests some lower level management system with strctxt and alloc_plural
  56.  *  built seperately on top of it.
  57.  */
  58.  
  59. /*  Another point is we need to free bit slices inorder to resuse them, it
  60.  *  is probably inlikely that we will free all 16-slices making it possible 
  61.  *  to retrieve a whole word slice so this will need to be done on a bit 
  62.  *  level. So as with the plural space. unless there is a GC we know we
  63.  *  can always allocate from the top of the space. At GC time though we
  64.  *  need to reuse any freed slots first, some pointer indicating where
  65.  *  to start searching from will do this neatly enough.
  66.  */
  67.  
  68.  
  69.  
  70. /*----------------------------------------------------------------------------*
  71.  * Function   : function_name
  72.  *
  73.  * Parameters : type name use
  74.  *
  75.  * Description:    What the function does should go here. The problem of 
  76.  *        justification
  77.  *
  78.  * Result     : type name description
  79.  *---------------------------------------------------------------------------*/
  80.  
  81. #ifdef __STDC__
  82.  
  83. #else
  84.  
  85. #endif
  86.